import type { App } from "vue";
import { createPinia, mapStores } from "pinia";
import { useAppStore } from "./modules/app";
import { userStore } from "./modules/user";
import { useTagsViewStroe } from "./modules/tagsView";
import { usePermissionStroe } from "./modules/permission";
import { usesSettingsStore } from "./modules/settings";

const storeMap = mapStores(
  useAppStore,
  userStore,
  useTagsViewStroe,
  usePermissionStroe,
  usesSettingsStore
);
const store = createPinia();
export function setupStore(app: App<Element>) {
  app.use(store);
}

export { store, storeMap };
